package com.huaxin.device.dto.enums.validation;

import com.huaxin.device.dto.enums.validator.ProtectionLevelValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = ProtectionLevelValidator.class)
public @interface ValidProtectionLevel {
    String message() default "无效的防护等级，允许值：IP20, IP30, IP40, IP42, IP54, IP55, IP65, IP67";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}

